package cn.tedu.submarine;

import javax.swing.*;

//鱼雷
public class Torpedo extends SeaObject{


    public Torpedo(int x,int y){
        super(5,18,x,y,1);

    }
   public void step(){
        y -= speed;
    }
    public ImageIcon getImage(){
        if (isLive()){
            return Images.torpedo;
        }else {
            return null;
        }
    }
    public boolean isOutOfBounds(){//检测深水炸弹越界
        return this.y<=-this.height;
    }
}
